﻿using BlogFile.Domain;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BlogFile.Repository.Map
{
    public class UploadFileMap : IEntityTypeConfiguration<UploadFile>
    {
        public void Configure(EntityTypeBuilder<UploadFile> builder)
        {
            builder.ToTable("SYS_UploadFile");
            builder.HasKey(s => s.Id);
            builder.Property(s => s.Id).HasColumnName("id");
            builder.Property(s => s.DomainName).HasColumnName("domain_name");
            builder.Property(s => s.DomainId).HasColumnName("domain_id");
            builder.Property(s => s.FileName).HasColumnName("file_name");
            builder.Property(s => s.Guid).HasColumnName("guid");
            builder.Property(s => s.Size).HasColumnName("size");
            builder.Property(s => s.Extension).HasColumnName("extension");
            builder.Property(s => s.SavePath).HasColumnName("save_path");
            builder.Property(s => s.CreateTime).HasColumnName("createtime");
            builder.Property(s => s.UpdateTime).HasColumnName("updatetime");
        }
    }
}
